import request from "@/api/request";

export function getSchoolList() {
  return request({
    method: "GET",
    url: "/school/",
  });
}

export function createSchool(school_code, school_name) {
  return request({
    method: "POST",
    url: "/school/",
    data: {
      school_code: school_code,
      school_name: school_name,
    },
  });
}

export function adminDelect(adminid) {
  return request({
    method: "DELETE",
    url: "user/school_admin/" + adminid + "/",
  });
}

export function modifySchool(id, school_code, school_name) {
  return request({
    method: "PUT",
    url: "/school/" + id + "/",
    data: {
      school_code: school_code,
      school_name: school_name,
    },
  });
}
